package cn.lhjl.day05.practice;

import java.util.Random;
import java.util.Scanner;

public class ProduceRandom {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入起始数");
        int starNum = scanner.nextInt();
        System.out.println("输入末尾数");
        int endNum = scanner.nextInt();
        produceRon(starNum,endNum);
    }

    public static void produceRon(int starNum, int endNum) {
        Random random = new Random();
        for (int i = 0; i < 20; i++) {
            System.out.println(random.nextInt(endNum - starNum + 1) + starNum);
        }
    }
}
